<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Home - gatsb" %>
<%@ Register Src="~/GatsbMap.ascx" TagName="GatsbMap" TagPrefix="decavuc" %>
<%@ Register Src="~/SetLocationWidget.ascx" TagName="SetLocationWidget" TagPrefix="decavuc" %>
<%@ Register Assembly="Decav.Gatsb.Web" Namespace="Decav.Gatsb.Web.Controls" TagPrefix="gatsb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderPlaceholder" Runat="Server">
    <link rel="Stylesheet" type="text/css" href="Styles/TwoColumnRightStyle.css" />
    <link rel="stylesheet" type="text/css" href="Styles/HomeStyle.css" />
    <script language="javascript" type="text/javascript">
    // <!--

    function Page_Loaded()
    {
        <%= friendMap.StartFunctionName %>();
    }
    
    function CenterMap(lati, longi)
    {
        <%= friendMap.MapName %>.SetCenter(new VELatLong(lati, longi));
    }
    
    // -->
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBodyPlaceholder" Runat="Server">
    <h1>Welcome, <asp:Literal runat="server" ID="usernameLiteral" /></h1>
    <div class="StatusRibbon" style="margin-top:-1px;" runat="server" id="serverStatus" visible="false"></div>
    <div class="StatusRibbon" style="margin-top:-1px" runat="server" id="incompleteLocationStatus" visible="false"></div>
    <div class="StatusRibbon" style="margin-top:-1px;" runat="server" id="inboxStatus">
    </div>
    <div class="StatusRibbon" style="margin-top:-1px" runat="server" id="suggestGettingStarted" visible="false">
        Welcome to Gatsb!  Learn to use Gatsb from your mobile phone by reading our
        <a href="GettingStarted.aspx">Getting Started</a> guide.<br />
        <br />
        You can always get help using the <i>help &amp; faq</i> menu option, or by
        sending a text message <i>"help"</i> to <i>x@gatsb.com</i>.
    </div>
    <div class="ColumnRight" style="margin-top:15px;">
        <div>
            <h3>Location</h3>
            <decavuc:SetLocationWidget runat="server" />
        </div>
        <div>
            <h3>Recent Updates</h3>
            <div id="noRecentEventsDiv" class="StatusRibbon" runat="server">
                There's nothing recent to report!
            </div>
            <asp:Repeater runat="server" ID="recentEventRepeater">
                <HeaderTemplate>
                    <ul class="EventList">    
                </HeaderTemplate>
                <ItemTemplate>
                    <li><a href="#" onclick="<%# GetLocationJavascript(((Decav.Gatsb.LocationCheckin)Container.DataItem).Location)  %>" class="Label"><img
                    src="<%# System.String.Format("Images/Pushpins/{0}.gif", GetLocationPushpinIndex(((Decav.Gatsb.LocationCheckin)Container.DataItem).Location.Id)) %>" alt="" /></a>
                    <gatsb:GatsbUserLink runat="server" User="<%# ((Decav.Gatsb.LocationCheckin)Container.DataItem).User %>"/> went to <gatsb:GatsbLocationLink runat="server" Location="<%# ((Decav.Gatsb.LocationCheckin)Container.DataItem).Location %>" />
                    (<%# Decav.Gatsb.StringFormatting.ToTimeAgo(((Decav.Gatsb.LocationCheckin)Container.DataItem).CheckinDate) %>)
                    <div style="clear:both"></div>
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    </ul>    
                </FooterTemplate>
            </asp:Repeater>
        </div>
    </div>
    <div class="ColumnMain">
        <div>
            <h3>Friend Map</h3>
            <decavuc:GatsbMap runat="server" id="friendMap" />
        </div>
        <div style="margin-top:40px;">
            <h1 style="margin-bottom:10px;">Recent happenings</h1>
            <div id="noRecentHappeningsDiv" runat="server" visible="false">Your friends have not posted anything recently!</div>
            <gatsb:HistoricalLocationRepeater runat="server" ID="recentHappenings"
                CssClass="HistoricalEventList" PersonNameFormat="FirstName" />
        </div>
    </div>
    <div style="clear:both"></div>
</asp:Content>

